﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Text;
using System.Reflection;
using SDT.DataService;


namespace SDT.DataService.Contexts
{
    public class LinkDownloadContext : SystemSpiderDataContext
   {
       #region Media
        [Function(Name = "dbo.sp_WC_LinkDownLoad_SelectList")]
        public ISingleResult<sp_WC_LinkDownLoad_SelectListResult> sp_WC_LinkDownLoad_SelectList()
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
            return ((ISingleResult<sp_WC_LinkDownLoad_SelectListResult>)(result.ReturnValue));
        }
       [Function(Name = "dbo.UpdateLinkDownload")]
       public int UpdateLinkDownload([Parameter(Name = "ID", DbType = "Int")] System.Nullable<int> iD, string pFile)
       {
           IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iD, pFile);
           return ((int)(result.ReturnValue));
       }

       [Function(Name = "dbo.UpdateLinkDownloadAll")]
       public int UpdateLinkDownloadAll([Parameter(Name = "ID", DbType = "Int")] System.Nullable<int> iD, [Parameter(Name = "PATHFILE", DbType = "NVarChar(2000)")] string pATHFILE)
       {
           IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), iD, pATHFILE);
           return ((int)(result.ReturnValue));
       }

       [Function(Name = "dbo.sp_MD_LinkDownload_ChangeStatus")]
       public int sp_MD_LinkDownload_ChangeStatus([Parameter(Name = "Id", DbType = "Int")] System.Nullable<int> id, [Parameter(Name = "Status", DbType = "TinyInt")] System.Nullable<byte> status)
       {
           IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), id, status);
           return ((int)(result.ReturnValue));
       }
       #endregion

       #region WC

       [Function(Name = "dbo.sp_WC_LinkDownload_Insert")]
       public int sp_WC_LinkDownload_Insert([Parameter(Name = "PageID", DbType = "Int")] System.Nullable<int> pageID, [Parameter(Name = "LinkURL", DbType = "NVarChar(500)")] string linkURL, [Parameter(Name = "Status", DbType = "TinyInt")] System.Nullable<byte> status, [Parameter(Name = "TypeFile", DbType = "TinyInt")] System.Nullable<byte> typeFile, [Parameter(Name = "IsImageDesc", DbType = "Bit")] System.Nullable<bool> isImageDesc, [Parameter(Name = "CategoryID", DbType = "Int")] System.Nullable<int> categoryID, [Parameter(Name = "SiteID", DbType = "Int")] System.Nullable<int> siteID, [Parameter(Name = "TotalFile", DbType = "Int")] System.Nullable<int> totalFile)
       {
           IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), pageID, linkURL, status, typeFile, isImageDesc, categoryID, siteID, totalFile);
           return ((int)(result.ReturnValue));
       }
       #endregion

   }
}
